package com.ruoyi.project.mahjong.service;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.ruoyi.project.mahjong.domain.TRecord;
import com.ruoyi.project.mahjong.domain.vo.*;

/**
 * 整体流水Service接口
 *
 * @author ruoyi
 * @date 2023-10-07
 */
public interface ITRecordService
{
    /**
     * 查询整体流水
     *
     * @param id 整体流水ID
     * @return 整体流水
     */
    public TRecord selectTRecordById(Long id);

    /**
     * 查询整体流水列表
     *
     * @param tRecord 整体流水
     * @return 整体流水集合
     */
    public List<TRecord> selectTRecordList(TRecord tRecord);

    /**
     * 新增整体流水
     *
     * @param tRecord 整体流水
     * @return 结果
     */
    public int insertTRecord(TRecord tRecord);

    /**
     * 修改整体流水
     *
     * @param tRecord 整体流水
     * @return 结果
     */
    public int updateTRecord(TRecord tRecord);

    /**
     * 批量删除整体流水
     *
     * @param ids 需要删除的整体流水ID
     * @return 结果
     */
    public int deleteTRecordByIds(Long[] ids);

    /**
     * 删除整体流水信息
     *
     * @param id 整体流水ID
     * @return 结果
     */
    public int deleteTRecordById(Long id);

    AllIncomeTypeMoneyVo selectRecordAllIncomeTypeMoney(Long shopId, String startTime, String endTime);

    ReceiveVo selectRealTimeData(Long shopId, String startTime, String endTime);

    List<Map<String,Object>> selectTableCollectList(Long shopId, String startTime, String endTime);


    /**
     * 查询现金和桌子消费
     * @param shopId
     * @return
     */
    Map<String, Object> selectCashAndTableCost(Long shopId, String startTime, String endTime);

    List<MemberRechargeVo> selectMemberIdRecharge(Long shopId, Date startTime, Date endTime, String phone);

    List<MemberCostRecordVo> selectCostRecord(Long shopId, String startTime, String endTime, String id);

    List<RechargeRankingVo> selectMemberRechargeList(Long shopId, String startTime, String endTime, String status);

    ShiftMoneyInfoVo selectShiftMoneyInfo(String startTime, String endTime, Long shopId,Long userId);

    /**
     * 根据交班id修改交班情况
     * @param record
     * @return
     */
    Integer updateTRecordByJbId(TRecord record);

    List<WorkRecordVo> selectWorkRecordList(String startTime, String endTime, Long shopId);

    List<ProductRecordInfoVo> selectReceive( List<Long> ids );

    List<RoomRecordInfoVo> selectRoomReceive(List<Long> ids);

    OpenTableRateVo selectOenTableRate(Long shopId);


    Integer addReceive(TRecord record);

    Integer updateDefault(Long costId, Long shopId);

    List<OtherReceiveVo> selectOtherReceive(List<Long> ids);

    List<TRecord> selectTopUpOrRefundList(Long shopId, String type, String startTime, String endTime, String deskId, String staffName);

    List<TRecord> deskMoneyList(Long shopId, String startTime, String endTime, String deskId, String staffName);
}
